package com.sgb.trip.api;

import com.sgb.link.entity.PickSelectEntity;
import com.sgb.link.entity.trip.AirportCityEntity;
import com.sgb.link.entity.trip.BaseCityEntity;
import com.sgb.trip.entity.FlightInfoEntity;
import com.sgb.trip.entity.FlightOrderDetailEntity;
import com.sgb.trip.entity.FlightOrdersInfoEntity;
import com.sgb.trip.entity.InsureServiceEntity;
import com.sgb.trip.entity.PassengerInfoEntity;
import com.swgk.core.base.model.entity.BaseEntity;
import com.swgk.core.base.model.entity.ListResponse;

import java.util.List;
import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Time:2021/6/16
 * Author:黄淋
 * Description:食住行接口
 */
public interface TripService {

    //城市三字码列表
    @GET("cityCode/cityList")
    Call<BaseEntity<BaseCityEntity<List<AirportCityEntity>>>> getCitySelectionList();

    //名称模糊搜索
    @GET("cityCode/queryCity")
    Call<BaseEntity<List<AirportCityEntity>>> queryCity(@Query("cityName") String cityName);

    //航班搜索
    @POST("airTicket/v2/list")
    Call<BaseEntity<List<FlightInfoEntity>>> checkFlight(@Body Map<String, Object> map);

    //航司代码
    @POST("airlineCode/getCodeList")
    Call<BaseEntity<List<PickSelectEntity>>> getCodeList(@Body Map<String, Object> map);

    //乘客列表
    @GET("passengerInfo/getPassengerInfo")
    Call<BaseEntity<List<PassengerInfoEntity>>> queryPassenger(@Query("name") String name);

    //新增-编辑联系人
    @POST("passengerInfo/saveOrUpdate")
    Call<BaseEntity<String>> saveOrUpdatePassenger(@Body Map<String, Object> map);

    //乘客列表
    @DELETE("passengerInfo/deleteById")
    Call<BaseEntity<String>> deletePassenger(@Query("id") String id);

    //保险数据
    @POST("insuranceInfo/getInsuranceInformation")
    Call<BaseEntity<List<InsureServiceEntity>>> getInsureList(@Body Map<String, Object> map);

    //提交订单
    @POST("ticketsOrder/v2/createOrder")
    Call<BaseEntity<String>> postFlightOrder(@Body Map<String, Object> map);

    //机票订单列表
    @POST("ticketsOrder/v2/getOrderPage")
    Call<BaseEntity<ListResponse<List<FlightOrdersInfoEntity>>>> getOrderList(@Body Map<String, Object> map);

    //机票订单详情
    @GET("ticketsOrder/orderDetails/{orderNo}")
    Call<BaseEntity<FlightOrderDetailEntity>> getFligtOrderDetail(@Path("orderNo") String orderNo);
}
